#ifndef __BINDED_PROPERTY_HH__
#define __BINDED_PROPERTY_HH__

#include "BaseBindedProperty.hh"

namespace Reflection
{

/**
 * @brief Property binded with the class instance. It can be modified.
 */
template< typename TPropertyType, typename TClassType >
class BindedProperty : public BaseBindedProperty
{
public:
 
    
public:
    /**
     * @brief Default ctor sets the class instance shared_ptr
     */
    BindedProperty( const typename TClassType::TypePtr& aClassInstance ) :
        iClassInstance( aClassInstance )
    {        
    }

    /**
     * @brief Basic set/get accessor to the type value
     */
    operator typename TPropertyType::PropertyType&( void )
    {
        return iClassInstance->*TPropertyType::iPointerToMember;
    }

private:
    ///here hold the shared_ptr to the class instance
    typename TClassType::TypePtr iClassInstance;
};

} // namespace Reflection

#endif //__BINDED_PROPERTY_HH__